from celery import Celery

# 创建Celery实例且名称为 ai_image
app = Celery('ai_image') 
# 从配置文件config.py中加载配置参数
app.config_from_object('src.celery.config') 
# 注册任务
app.autodiscover_tasks([
    'src.celery.ai_image.task'
])